package com.kaifamiao.thread.d0926;

public class Demo01 {

    public static void main(String[] args) throws InterruptedException {
        MyRunnable runnable = new MyRunnable();

//        Runnable runnable1 = new Runnable() {
//            @Override
//            public void run() {
//
//            }
//        };

        Thread t = new Thread(runnable, "一号线程");
        Thread t1 = new Thread(runnable, "二号线程");

        t.setPriority(5);
        t1.setPriority(6);


        t.start();
        t1.start();

//        Thread.sleep(5000);
        for (int i = 0; i < 50; i++) {
            System.out.println("main线程 " + i);
        }
    }
}
